from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time

# testCase = "DBshop020-商品管理删除品牌流程"
# # 1.登录后台，商品管理，商品品牌
# firefox=openBrowser(url)
# firefox.get(urlAdmin)
# DBshopLoginAdmin(firefox)
# DBshopEnterMenu2(firefox,'商品管理','商品品牌')
# # 2.删除名称“苹果”的品牌。
# firefox.find_element_by_xpath("//td[contains(.,'苹果')]/following-sibling::td[4]/a[2]").click()
# firefox.switch_to.alert.accept()
# time.sleep(3)
# # 断言：找不到名称为苹果的品牌即测试成功
# try:
#     firefox.find_element_by_xpath("//td[contains(.,'苹果')]")
#     writeLog("%s 测试失败"%testCase)
#     getPhoto(firefox)
# except:
#     writeLog("%s 测试通过" % testCase)
# firefox.quit()